using System.Net;
using Microsoft.WindowsAzure;

namespace AzureContrib.WindowsAzure.StorageClient
{
	/// <summary>
	/// Wrapper for <see cref="StorageCredentials"/>
	/// </summary>
	public interface IStorageCredentials
	{
		/// <summary>
		/// <see cref="StorageCredentials.AccountName"/>
		/// </summary>
		string AccountName { get; }

		/// <summary>
		/// <see cref="StorageCredentials.NeedsTransformUri"/>
		/// </summary>
		bool NeedsTransformUri { get; }

		/// <summary>
		/// <see cref="StorageCredentials.CanSignRequest"/>
		/// </summary>
		bool CanSignRequest { get; }

		/// <summary>
		/// <see cref="StorageCredentials.CanSignRequestLite"/>
		/// </summary>
		bool CanSignRequestLite { get; }

		/// <summary>
		/// <see cref="StorageCredentials.CanComputeHmac"/>
		/// </summary>
		bool CanComputeHmac { get; }

		/// <summary>
		/// <see cref="StorageCredentials.TransformUri"/>
		/// </summary>
		string TransformUri(string resourceUri);

		/// <summary>
		/// <see cref="StorageCredentials.SignRequest"/>
		/// </summary>
		void SignRequest(HttpWebRequest request);

		/// <summary>
		/// <see cref="StorageCredentials.SignRequestLite"/>
		/// </summary>
		void SignRequestLite(HttpWebRequest request);

		/// <summary>
		/// <see cref="StorageCredentials.ComputeHmac"/>
		/// </summary>
		string ComputeHmac(string value);

		/// <summary>
		/// The wrapped credentials behind this contract.
		/// </summary>
		StorageCredentials WrappedCredentials { get; }
	}
}